import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;

/**
 * @author 兴趣使然黄小黄
 * @version 1.0
 * @date 2023/9/6 15:33
 * 控制 Junit 的执行顺序
 */
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
public class JunitTest01 {

    @Order(1)
    @Test
    void A() {
        System.out.println("A");
    }

    @Test
    void test01() {
        System.out.println("test01");
    }

    @Test
    void test02() {
        System.out.println("test02");
    }

    @Test
    void test03() {
        System.out.println("test03");
    }

    @Test
    void test04() {
        System.out.println("test04");
    }

    @Test
    void test05() {
        System.out.println("test05");
    }

    @Order(2)
    @Test
    void a() {
        System.out.println("a");
    }

    @Order(3)
    @Test
    void b() {
        System.out.println("b");
    }
}
